package com.fanilycar51.mvp;

import android.util.Log;
import android.widget.TextView;

import com.fanilycar51.mvp.mvpbase.BaseMvpActivity;
import com.fanilycar51.mvp.presenter.MainPresenter;
import com.fanilycar51.mvp.view.IMainView;

import java.util.List;

import butterknife.BindView;

public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter> implements IMainView {

    @BindView(R.id.tv)
    TextView tv;

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showMsg(String msg) {

    }

    @Override
    public void showGirls(List<String> datas) {
        for (int i = 0; i < datas.size(); i++) {
            Log.i("test", datas.get(i));
        }
    }

    @Override
    public void showTvData(String content) {
        tv.setText(content);
    }

    @Override
    protected int getContentLayout() {
        return R.layout.activity_main;
    }


    @Override
    public MainPresenter createPresenter() {
        return new MainPresenter();
    }

    @Override
    protected void initData() {
        presenter.fetch();
    }
}
